package org.example.test;

import java.util.Arrays;
import java.util.Random;

public class Solution03 {
    public static void main(String[] args) {
        Solution03 sol = new Solution03();
        int[] powers = new int[]{3,1,4,7,2,6};
        System.out.println(Arrays.toString(sol.findStrongestSquad(powers)));

    }

    public int[] findStrongestSquad (int[] powers) {
        // write code here
        int[] result = new int[2];
        int start=0,end=0;   //坐标
        int maxLength=2;  //长度
        int betweenMax=-1;    //最大坐标
        int betweenMin=-1;    //最小坐标
        for(int i = 1; i < powers.length; i++) {
            if(powers[i]<powers[start]&&(betweenMax==-1||powers[i]>powers[betweenMax])) {}
        }
        result[0]=maxLength;
        if(maxLength==2){
            result[1]=Math.min(powers[start],powers[end]);
        }else{
            result[1]=powers[betweenMin];
        }
        return new int[]{(int) (Math.random()*10), (int) (Math.random()*10)};
    }
}
